

from core.himesis import Himesis, HimesisPreConditionPattern
import cPickle as pickle
from uuid import UUID

class HEraseDisconnectedStationNAC1Bridge(HimesisPreConditionPattern):
    def __init__(self):
        """
        Creates the himesis graph representing the AToM3 model HEraseDisconnectedStationNAC1Bridge.
        """
        # Flag this instance as compiled now
        self.is_compiled = True
        
        super(HEraseDisconnectedStationNAC1Bridge, self).__init__(name='HEraseDisconnectedStationNAC1Bridge', num_nodes=1, edges=[])
        
        # Add the edges
        self.add_edges([])
        # Set the graph attributes
        self["GUID__"] = UUID('e8c653c5-97d7-4cc0-814b-26eec74175e1')
        
        # Set the node attributes
        self.vs[0]["MT_subtypeMatching__"] = False
        self.vs[0]["MT_label__"] = """1"""
        self.vs[0]["mm__"] = """MT_pre__Station_S"""
        self.vs[0]["MT_subtypes__"] = pickle.loads("""(lp1
.""")
        self.vs[0]["MT_pre__name"] = """from HEraseDisconnectedStationLHS import HEraseDisconnectedStationLHS
from HEraseDisconnectedStationNAC1 import HEraseDisconnectedStationNAC1
lhs = HEraseDisconnectedStationLHS()
return HEraseDisconnectedStationLHS().eval_name1(attr_value, this) and HEraseDisconnectedStationNAC1(lhs).eval_name1(attr_value, this)"""
        self.vs[0]["MT_dirty__"] = False
        self.vs[0]["GUID__"] = UUID('82dd9ed1-eb28-42b1-9819-25875d4e20ce')

    def eval_name1(self, attr_value, this):
        from HEraseDisconnectedStationLHS import HEraseDisconnectedStationLHS
        from HEraseDisconnectedStationNAC1 import HEraseDisconnectedStationNAC1
        lhs = HEraseDisconnectedStationLHS()
        return HEraseDisconnectedStationLHS().eval_name1(attr_value, this) and HEraseDisconnectedStationNAC1(lhs).eval_name1(attr_value, this)


    def constraint(self, PreNode, graph):
        """
            Executable constraint code. 
            @param PreNode: Function taking an integer as parameter
                            and returns the node corresponding to that label.
        """
        return True

